﻿using System;

namespace InputBoxes.Controls
{
    public class ValueTextChangedEventArgs : EventArgs
    {
        private readonly string _previousText;
        private readonly bool _previousValid;
        private readonly string _currentText;
        private readonly bool _currentValid;

        public ValueTextChangedEventArgs(string previousText, bool previousValid, string currentText, bool currentValid)
        {
            _previousText = previousText;
            _previousValid = previousValid;
            _currentText = currentText;
            _currentValid = currentValid;
        }

        public string PreviousText
        {
            get { return _previousText; }
        }

        public bool PreviousValid
        {
            get { return _previousValid; }
        }

        public string CurrentText
        {
            get { return _currentText; }
        }

        public bool CurrentValid
        {
            get { return _currentValid; }
        }
    }

    public delegate void ValueTextChangedEvent(object sender, ValueTextChangedEventArgs e);
}